
package avenue;

import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
import model.AppUser;


/**
 *
 * @author Team-2
 */
public class UserBoxRenderer extends DefaultListCellRenderer{
    @Override
           public Component getListCellRendererComponent(
                   JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
               super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
               if (value instanceof AppUser) {
                   AppUser mec = (AppUser)value;
                   setText(mec.getLName()+ " " +mec.getFName());
               }
               return this;
           }
}

